package com.zhang.aloneway_springboot.pojo;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;

@Entity //表示这是一个实体类
@Table(name = "user") //表示对应的表名是user表
@JsonIgnoreProperties({"handler","hibernateLazyInitializer"}) //忽略User对象的handler和hibernateLazyInitializer属性
@Data
@NoArgsConstructor
@AllArgsConstructor
public class User implements Serializable {

    private static final long serialVersionUID = -671764342241886842L;


    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Integer id;
    private String username;
    private String password;

}
